// 基础销售属性的接口
export interface IBaseSaleAttr {
  id: number;
  name: string;
}

export type IBaseSaleAttrList = IBaseSaleAttr[];

// 每个品牌的接口
export interface ITrademark {
  id: number;
  logoUrl: string;
  tmName: string;
}

export type ITrademarkList = ITrademark[];

// // Spu销售属性的接口
export interface ISpuSaleAttrValue {
  baseSaleAttrId?: number;
  id?: number;
  isChecked?: null;
  saleAttrName?: string;
  saleAttrValueName?: string;
  spuId?: number;
}

export type ISpuSaleAttrValueList = ISpuSaleAttrValue[];

export interface ISpuSaleAttr {
  baseSaleAttrId?: number;
  id?: number;
  saleAttrName?: string;
  spuId?: number;
  spuSaleAttrValueList: ISpuSaleAttrValueList;
  flag?: boolean;
  inputValue?: string;
  saleAttrInfo?: string;
}

export type ISpuSaleAttrList = ISpuSaleAttr[];

// SPU图片数据的接口
export interface IImage {
  id?: number;
  imgName: string;
  imgUrl: string;
  spuId?: number;
  isChecked?: number;
}

export type IImageList = IImage[];

// spu数据的接口
export interface ISpu {
  category3Id: number | string;
  description: string;
  id?: number | string;
  spuImageList: null | IImageList;
  spuName: string;
  spuSaleAttrList: null | ISpuSaleAttrValueList;
  tmId: number | string;
}

// 请求SPU返回数据的接口

export interface ISpuList {
  records: ISpu[];
  total: number;
}

//  changeScene函数参数的类型
export interface IScene {
  cutScene: number;
  flag?: number;
}

// 平台属性属性值数据的接口
export interface IAttrValue {
  attrId?: number;
  id?: number;
  valueName: string;
  flag?: boolean;
}

// 平台属性属性值列表数据的类型
export type IAttrValueList = IAttrValue[];

// 平台属性返回数据的接口
export interface IAttr {
  attrName: string;
  attrValueList: IAttrValue[];
  categoryId: number | undefined;
  categoryLevel: number;
  id?: number;
  attrInfo?: string;
}

// 平台属性返回数据列表的类型
export type IAttrList = IAttr[];

// 添加SKU所需参数的接口
export interface ISkuSaleAttrValue {
  saleAttrId: number;
  saleAttrValueId: number;
}

export type ISkuSaleAttrValueList = ISkuSaleAttrValue[];

export interface ISkuAttrValue {
  attrId: number;
  valueId: number;
}

export type ISkuAttrValueList = ISkuAttrValue[];

export interface IAddSkuParams {
  category3Id: number | string;
  price: number;
  skuAttrValueList: ISkuAttrValueList;
  skuDefaultImg: string;
  skuDesc: string;
  skuName: string;
  skuSaleAttrValueList: ISkuSaleAttrValueList;
  spuId?: number | string;
  tmId: number | string;
  weight: string;
}

// getAddSkuData函数参数的接口
export interface ISkuParams {
  spu: ISpu;
  category1Id: number | string;
  category2Id: number | string;
}

// sku数据列表的接口
export interface ISku {
  category3Id?: number;
  createTime: string;
  id?: number;
  isSale?: number;
  price: number;
  skuAttrValueList: null;
  skuDefaultImg: string;
  skuDesc: string;
  skuImageList: null;
  skuName: string;
  skuSaleAttrValueList: null;
  spuId?: number;
  tmId?: number;
  weight: string;
}

export type ISkuList = ISku[]
